
public class Test06{
    public static void main(String[] args){
        int[] arr = {1,3,5,43,16,0,7,9,11,13,10};
        int[] arr1 = {-5,-15};
        System.out.println(getMax(arr));
        System.out.println(getMax(arr1));
    }
    public static int getMax(int[] arr){
            int k=arr[0];
            for(int i =1 ;i<arr.length;i++){
                if(arr[i] > k){
                    k=arr[i];
                }
            }
           return k; 
            
        } 
        
}